/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.portalnahouby.api.dto;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

/**
 * DTO for Forest entity
 *
 * @author Tomáš Čejka
 */
public class ForestDTO implements Serializable {

    private Long id;
    private String name;
    private String info;
    private List<MushroomDTO> mushrooms = new LinkedList<MushroomDTO>();

    public ForestDTO() {
    }
    
    public ForestDTO(Long id, String name, String info,List<MushroomDTO> mushrooms ) {
        this.id = id;
        this.name = name;
        this.info = info;
        this.mushrooms = mushrooms;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public List<MushroomDTO> getMushrooms() {
        return mushrooms;
    }

    public void setMushrooms(List<MushroomDTO> mushrooms) {
        this.mushrooms = mushrooms;
    }

    
    @Override
	public String toString() {
		return "ForestDTO{" + "id=" + id + ", name=" + name + ", info=" + info + ", mushrooms=" + mushrooms + '}';
	}
    
    @Override
    public int hashCode() {
        int hash = 5;
        hash = 23 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ForestDTO other = (ForestDTO) obj;
        if (this.id == null || !this.id.equals(other.id)) {
            return false;
        }
        return true;
    }
    
    
}
